{% extends "base.html" %}

{% block title %}提交侦察数据 - 协同调度信息系统{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-8">
        <div class="card">
            <div class="card-header">
                <h4 class="mb-0">
                    <i class="fas fa-plus"></i> 提交侦察数据
                </h4>
            </div>
            <div class="card-body">
                <form method="POST">
                    {{ form.hidden_tag() }}
                    
                    <div class="mb-3">
                        {{ form.title.label(class="form-label") }}
                        {{ form.title(class="form-control", placeholder="请输入侦察数据的标题") }}
                        {% if form.title.errors %}
                            <div class="text-danger">
                                {% for error in form.title.errors %}
                                    <small>{{ error }}</small>
                                {% endfor %}
                            </div>
                        {% endif %}
                    </div>

                    <div class="mb-3">
                        {{ form.target_system.label(class="form-label") }}
                        {{ form.target_system(class="form-control", placeholder="请输入目标系统名称或IP地址") }}
                        {% if form.target_system.errors %}
                            <div class="text-danger">
                                {% for error in form.target_system.errors %}
                                    <small>{{ error }}</small>
                                {% endfor %}
                            </div>
                        {% endif %}
                    </div>

                    <div class="row">
                        <div class="col-md-6">
                            <div class="mb-3">
                                {{ form.data_type.label(class="form-label") }}
                                {{ form.data_type(class="form-select") }}
                                {% if form.data_type.errors %}
                                    <div class="text-danger">
                                        {% for error in form.data_type.errors %}
                                            <small>{{ error }}</small>
                                        {% endfor %}
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="mb-3">
                                {{ form.priority.label(class="form-label") }}
                                {{ form.priority(class="form-select") }}
                                {% if form.priority.errors %}
                                    <div class="text-danger">
                                        {% for error in form.priority.errors %}
                                            <small>{{ error }}</small>
                                        {% endfor %}
                                    </div>
                                {% endif %}
                            </div>
                        </div>
                    </div>

                    <div class="mb-3">
                        {{ form.content.label(class="form-label") }}
                        {{ form.content(class="form-control", rows="8", placeholder="请详细描述侦察到的信息内容...") }}
                        {% if form.content.errors %}
                            <div class="text-danger">
                                {% for error in form.content.errors %}
                                    <small>{{ error }}</small>
                                {% endfor %}
                            </div>
                        {% endif %}
                        <div class="form-text">
                            <i class="fas fa-info-circle"></i>
                            请详细描述侦察到的信息，包括但不限于：系统配置、网络拓扑、漏洞信息、用户行为等
                        </div>
                    </div>

                    <div class="d-grid gap-2 d-md-flex justify-content-md-end">
                        <a href="{{ url_for('recon_dashboard') }}" class="btn btn-secondary me-md-2">
                            <i class="fas fa-arrow-left"></i> 返回
                        </a>
                        {{ form.submit(class="btn btn-primary") }}
                    </div>
                </form>
            </div>
        </div>

        <!-- 填写提示 -->
        <div class="card mt-4">
            <div class="card-header">
                <h6 class="mb-0">
                    <i class="fas fa-lightbulb"></i> 填写提示
                </h6>
            </div>
            <div class="card-body">
                <div class="row">
                    <div class="col-md-6">
                        <h6><i class="fas fa-check-circle text-success"></i> 好的侦察数据应该包含:</h6>
                        <ul class="list-unstyled">
                            <li><i class="fas fa-arrow-right text-primary"></i> 明确的目标系统信息</li>
                            <li><i class="fas fa-arrow-right text-primary"></i> 详细的侦察内容描述</li>
                            <li><i class="fas fa-arrow-right text-primary"></i> 准确的数据类型分类</li>
                            <li><i class="fas fa-arrow-right text-primary"></i> 合理的优先级评估</li>
                        </ul>
                    </div>
                    <div class="col-md-6">
                        <h6><i class="fas fa-exclamation-triangle text-warning"></i> 注意事项:</h6>
                        <ul class="list-unstyled">
                            <li><i class="fas fa-arrow-right text-warning"></i> 确保信息的准确性和完整性</li>
                            <li><i class="fas fa-arrow-right text-warning"></i> 避免包含敏感的个人信息</li>
                            <li><i class="fas fa-arrow-right text-warning"></i> 按照实际威胁程度设置优先级</li>
                            <li><i class="fas fa-arrow-right text-warning"></i> 提交后数据将进入分析流程</li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
